/*
 * BanBu_FuncView
 * @description 本文件提供用户自己的个人空间提供的更多功能（设置动态插件，设置语音签名）
 * @package
 * @author 		***
 * @copyright
 * @version 		1.0
 * @description 本文件提供用户自己的个人空间提供的更多功能（设置动态插件，设置语音签名）
 */

#import "BanBu_FuncView.h"

#import "AppCommunicationManager.h"
#import "AppDataManager.h"
#import "BanBu_HisFriendViewController.h"
@implementation BanBu_FuncView

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code
    }
    return self;
}

+ (BanBu_FuncView *)instanceView
{
    return [[[NSBundle mainBundle] loadNibNamed:@"BanBu_FuncView" owner:nil options:nil] objectAtIndex:0];
}

+ (BanBu_FuncView *)instanceViewSelf
{
    return [[[NSBundle mainBundle] loadNibNamed:@"BanBu_FuncView_Self" owner:nil options:nil] objectAtIndex:0];
}


#pragma mark - 初始化界面(个人空间的设置部分界面)
- (void)initViewSelf
{
    [plusSet setTitle:NSLocalizedString(@"plasSet", nil) forState:UIControlStateNormal];
    [voiceSet setTitle:NSLocalizedString(@"voiceSet", nil) forState:UIControlStateNormal];

}
/**
 *	@brief	初始化界面数据
 *    "writeMessage" = "发起对话";
 *    "addLink" = "添加关注";
 *    "delLink" = "取消关注";
 *    "pullBlackTitle" = "拉黑";
 *    "pullBlackAndReport" = "拉黑并举报";
 *	@param 	_isLink 	是否已关注
 */
-(void)initDataWithLinkUserid:(NSString *)userid
{
    self.userid = userid;
    
    [chatBtn setTitle:NSLocalizedString(@"writeMessage", nil) forState:UIControlStateNormal];
    [pullblack setTitle:NSLocalizedString(@"pullBlackTitle", nil) forState:UIControlStateNormal];
    [reportBtn setTitle:NSLocalizedString(@"pullBlackAndReport", nil) forState:UIControlStateNormal];
        if([MyAppDataManager.useruid isEqualToString:_userid]){
        _kind = 5;//自己
        return;
    }
    
    NSString *searchStr = [NSString stringWithFormat:@",%@,",_userid];
    if([[[[UserDefaults valueForKey:MyAppDataManager.useruid] valueForKey:FriendShip] valueForKey:@"x"] rangeOfString:searchStr].location!=NSNotFound&&[[[[UserDefaults valueForKey:MyAppDataManager.useruid] valueForKey:FriendShip] valueForKey:@"f"] rangeOfString:searchStr].location!=NSNotFound&&[[[[UserDefaults valueForKey:MyAppDataManager.useruid] valueForKey:FriendShip] valueForKey:@"g"] rangeOfString:searchStr].location!=NSNotFound)
    {
        _kind = 4;
        return;
    }
    NSString *fensi = [[[UserDefaults valueForKey:MyAppDataManager.useruid]valueForKey:FriendShip] valueForKey:@"f"];
    NSString *guanzhu = [[[UserDefaults valueForKey:MyAppDataManager.useruid]valueForKey:FriendShip] valueForKey:@"g"];
    NSString *friend = [[[UserDefaults valueForKey:MyAppDataManager.useruid]valueForKey:FriendShip] valueForKey:@"h"];
    NSString *black = [[[UserDefaults valueForKey:MyAppDataManager.useruid]valueForKey:FriendShip] valueForKey:@"x"];
    if([friend rangeOfString:_userid].location != NSNotFound)
    {
        _linked = YES;
        _kind = 2;//好友
    }
    
    else if([guanzhu rangeOfString:_userid].location != NSNotFound)
    {
        _linked = YES;
        _kind = 0;//关注
    }
    else if([fensi rangeOfString:_userid].location != NSNotFound)
    {
        _linked = NO;
        _kind = 1;//粉丝
    }
    else if([black rangeOfString:_userid].location != NSNotFound)
    {
        _linked = NO;
        _kind = 3;//黑名单
    }
    else
    {
        _linked = NO;
        _kind = 4;//陌生人
    }
    [self setLinkButtonAppearence:_linked];
  
}

-(void)setLinkButtonAppearence:(BOOL)_isLink
{
    [linkBtn setTitle:NSLocalizedString(_isLink?@"delLink":@"addLink", nil) forState:UIControlStateNormal];
    [linkBtn setBackgroundImage:[UIImage imageNamed:_isLink?@"delink.png":@"addlink.png"] forState:UIControlStateNormal];
}

- (IBAction)starChat:(id)sender
{
    if(_startChatReturn)
    {
        _startChatReturn(sender,YES);
    }
}

- (IBAction)link:(id)sender
{
    [self addLinkOrCancelLink];
}
- (IBAction)pullblack:(id)sender
{
    [self addBlack];
}
- (IBAction)report:(id)sender
{
    [self reportTheUser];
}
#pragma mark - 设置语音
- (IBAction)voiceSetting:(id)sender
{
    if(_gotoVoiceSetting)
    {
        _gotoVoiceSetting(sender);
    }
}

#pragma mark - 设置动态插件
- (IBAction)plusSetting:(id)sender
{
    if(_gotoPlugSetting)
    {
        _gotoPlugSetting(sender);
    }
}
/**
 *	@brief	举报这个用户
 */
-(void)reportTheUser
{
    aReportView = [[BanBu_ReportView alloc]initWithFrame:CGRectMake(0, 0, 320, __MainScreen_Height+20) andType:REPORT_USER];
    aReportView.delegate = self;
    [_personData.navigationController.view addSubview:aReportView];
    [aReportView release];
}
/**
 *	@brief	BanBu_ReportView 的delegate
 *
 *	@param 	message 	举报信息
 */
-(void)reportAndPullBlack:(NSString *)message

{
    //    NSLog(@"%@",message);
    NSMutableDictionary *pars = [NSMutableDictionary dictionaryWithCapacity:2];
    [pars setValue:_userid forKey:ReportTouID];
    [pars setValue:message forKey:@"saytext"];
    [AppComManager getBanBuData:BanBu_Report_User par:pars delegate:self];
    _personData.navigationController.view.userInteractionEnabled = NO;
    [TKLoadingView showTkloadingAddedTo:_personData.navigationController.view  title:NSLocalizedString(@"chuliNotice", nil) activityAnimated:YES];
    _isBlack = YES;
    
}

/**
 *	@brief	添加关注 / 取消关注
 */
- (void)addLinkOrCancelLink

{
    NSString *title = _linked?NSLocalizedString(@"unlinkButton", nil):NSLocalizedString(@"guanzhuMessage", nil);
    UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"noticeNotice", nil)
                                                        message:title
                                                       delegate:self cancelButtonTitle:NSLocalizedString(@"cancelNotice", nil) otherButtonTitles:NSLocalizedString(@"confirmNotice", nil), nil];
    [alertView show];
    [alertView release];
}

/**
 *	@brief	拉黑操作
 */

- (void)addBlack

{
    if(!_isBlack)
    {
        NSString *action = @"black";
        NSMutableDictionary *pars = [NSMutableDictionary dictionary];
        [pars setValue:_userid forKey:LinkTouID];
        [pars setValue:action forKey:Action];
        [AppComManager getBanBuData:BanBu_Set_Friend_Link par:pars delegate:self];
        [TKLoadingView showTkloadingAddedTo:_personData.navigationController.view title:NSLocalizedString(@"chuliNotice", nil) activityAnimated:YES];

        _isBlack = YES;
    }
    else
    {
        [TKLoadingView showTkloadingAddedTo:_personData.navigationController.view  title:NSLocalizedString(@"pullBlackOK", nil) activityAnimated:NO duration:1.0];
    }
}

#pragma UIAlertView delegate

- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex
{
    if(buttonIndex == alertView.firstOtherButtonIndex)
    {
        NSString *action = _linked?@"unlink":@"link";
        NSMutableDictionary *pars = [NSMutableDictionary dictionaryWithCapacity:2];
        [pars setValue:_userid forKey:LinkTouID];
        [pars setValue:action forKey:Action];
        [AppComManager getBanBuData:BanBu_Set_Friend_Link par:pars delegate:self];
        _personData.navigationController.view.userInteractionEnabled = NO;
        _isBlack = NO;
        
        [TKLoadingView showTkloadingAddedTo:_personData.navigationController.view title:NSLocalizedString(@"chuliNotice", nil) activityAnimated:YES];
        
    }
}

/**
 *	@brief	banbuRequestDidFinished
 *
 *	@param 	resDic
 *	@param 	error
 */
- (void)banbuRequestDidFinished:(NSDictionary *)resDic error:(NSError *)error

{
    _personData.navigationController.view.userInteractionEnabled = YES;

    if(error)
    {
        if([error.domain isEqualToString:BanBuDataformatError])
        {
            [TKLoadingView showTkloadingAddedTo:_personData.navigationController.view title:NSLocalizedString(@"network_error", nil) activityAnimated:NO duration:2.0];
        }
        else
        {
            [TKLoadingView showTkloadingAddedTo:_personData.navigationController.view title:NSLocalizedString(@"network_error", nil) activityAnimated:NO duration:2.0];
        }
        return;
    }


    if([AppComManager respondsDic:resDic isFunctionData:BanBu_Set_Friend_Link])
    {
        if([[resDic valueForKey:@"ok"]boolValue])
        {
            
            NSNumber * number = [NSNumber numberWithInt:[[resDic valueForKey:@"getscore"] integerValue]];
            dispatch_async(dispatch_get_main_queue(), ^{
                [MyAppDataManager showGoldView:number andView:_personData.navigationController.view];
            });
            
            NSMutableDictionary *uidDic = [NSMutableDictionary dictionaryWithDictionary:[UserDefaults valueForKey:MyAppDataManager.useruid]];
            [uidDic setValue:[resDic valueForKey:@"friendlist"] forKey:FriendShip];
            [uidDic setValue:[resDic valueForKey:@"friendsum"] forKey:@"friendsum"];
            [UserDefaults setValue:uidDic forKey:MyAppDataManager.useruid];
            [UserDefaults synchronize];
            
            if(!_isBlack || _linked ==YES)
            {
                if(!_linked)
                {
//关注成功
                    
                    [self setLinkButtonAppearence:!_linked];
                    if(self.addlinkReturn)
                    {
                        _addlinkReturn(linkBtn,YES,!_linked);
                    }
                    for(BanBu_HisFriendViewController *viewController in _personData.navigationController.viewControllers)
                    {
                        if([viewController isKindOfClass:[BanBu_HisFriendViewController class]])
                        {
                            NSMutableDictionary *hisFriendDic = [NSMutableDictionary dictionaryWithDictionary:[viewController.hisFriends objectAtIndex:viewController.linkRow]];
                            [hisFriendDic setValue:[NSNumber numberWithBool:!_linked] forKey:@"linked"];
                            
                            [viewController.hisFriends replaceObjectAtIndex:viewController.linkRow withObject:hisFriendDic];
                            [viewController.tableView reloadRowsAtIndexPaths:[NSArray arrayWithObject:[NSIndexPath indexPathForRow:viewController.linkRow inSection:0]] withRowAnimation:UITableViewRowAnimationNone];

                        }
                    }
                }
                else
                {
//取消关注成功
                    [self setLinkButtonAppearence:!_linked];
                    if(self.addlinkReturn)
                    {
                        _addlinkReturn(linkBtn,YES,!_linked);
                    }
                    for(BanBu_HisFriendViewController *viewController in _personData.navigationController.viewControllers)
                    {
                        if([viewController isKindOfClass:[BanBu_HisFriendViewController class]])
                        {
                            NSMutableDictionary *hisFriendDic = [NSMutableDictionary dictionaryWithDictionary:[viewController.hisFriends objectAtIndex:viewController.linkRow]];
                            [hisFriendDic setValue:[NSNumber numberWithBool:!_linked] forKey:@"linked"];
                            
                            [viewController.hisFriends replaceObjectAtIndex:viewController.linkRow withObject:hisFriendDic];
                            [viewController.tableView reloadRowsAtIndexPaths:[NSArray arrayWithObject:[NSIndexPath indexPathForRow:viewController.linkRow inSection:0]] withRowAnimation:UITableViewRowAnimationNone];
                            
                        }
                    }
                }
                _linked = !_linked;
                if(!_linked && _isBlack)
                {
//拉黑成功
                    if(self.pullBlackReturn)
                    {
                        _pullBlackReturn(pullblack,YES);
                    }
                    [TKLoadingView showTkloadingAddedTo:_personData.navigationController.view title:NSLocalizedString(@"pullBlackOK", nil) activityAnimated:NO duration:1.0];
                }
                else
                {
//关注成功
                    if(self.addlinkReturn)
                    {
                        _addlinkReturn(linkBtn,YES,_linked);
                    }
                    [TKLoadingView dismissTkFromView:_personData.navigationController.view animated:NO afterShow:0];
                    [TKLoadingView showTkloadingAddedTo:_personData.navigationController.view title:_linked?NSLocalizedString(@"linkSuccess", nil):NSLocalizedString(@"unlinkSuccess", nil) activityAnimated:NO duration:1.0];
                    
                }
            }
            else
            {
//拉黑成功
                if(self.pullBlackReturn)
                {
                    _pullBlackReturn(pullblack,YES);
                }
                [TKLoadingView showTkloadingAddedTo:_personData.navigationController.view title:NSLocalizedString(@"pullBlackOK", nil) activityAnimated:NO duration:1.0];
            }
            //判断好友关系
            
            NSString *fensi = [[[UserDefaults valueForKey:MyAppDataManager.useruid]valueForKey:FriendShip] valueForKey:@"f"];
            NSString *guanzhu = [[[UserDefaults valueForKey:MyAppDataManager.useruid]valueForKey:FriendShip] valueForKey:@"g"];
            NSString *friend = [[[UserDefaults valueForKey:MyAppDataManager.useruid]valueForKey:FriendShip] valueForKey:@"h"];
            NSString *black = [[[UserDefaults valueForKey:MyAppDataManager.useruid]valueForKey:FriendShip] valueForKey:@"x"];
            if([friend rangeOfString:_userid].location != NSNotFound)
            {
//添加备注
                _linked = YES;
                _kind = 2;
//                double delayInSeconds = 0.5;
//                dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC));
//                dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
//                    if(self.view)
//                    {
//                        
//                        CATransition *transition = [CATransition animation];
//                        transition.duration = 0.5f;
//                        transition.delegate = self;
//                        transition.fillMode = kCAFillModeForwards;
//                        transition.timingFunction = UIViewAnimationCurveEaseInOut;
//                        transition.type = @"fade";
//                        transition.removedOnCompletion = NO;
//                        [self.navigationController.view.layer removeAnimationForKey:@"reveal"];
//                        [self.navigationController.view.layer addAnimation:transition forKey:@"reveal"];
//                        
//                        aNote = [[BanBu_NoteView alloc]initWithFrame:self.navigationController.view.bounds andTitle:[MyAppDataManager theRevisedName:[_profile valueForKey:@"pname"] andUID:_userid]];
//                        aNote.delegate = self;
//                        [self.navigationController.view addSubview:aNote];
//                        [aNote release];
//                        
//                    }
//                
//                    
//                    
//                });
        
                
                
            }
            else if([guanzhu rangeOfString:_userid].location != NSNotFound)
            {
//添加备注
                _linked = YES;
                _kind = 0;
                
//                double delayInSeconds = 0.5;
//                dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC));
//                dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
//                    if(self.view)
//                    {
//                        
//                        CATransition *transition = [CATransition animation];
//                        transition.duration = 0.5f;
//                        transition.delegate = self;
//                        transition.fillMode = kCAFillModeForwards;
//                        transition.timingFunction = UIViewAnimationCurveEaseInOut;
//                        transition.type = @"fade";
//                        transition.removedOnCompletion = NO;
//                        [self.navigationController.view.layer removeAnimationForKey:@"reveal"];
//                        [self.navigationController.view.layer addAnimation:transition forKey:@"reveal"];
//                        
//                        aNote = [[BanBu_NoteView alloc]initWithFrame:self.navigationController.view.bounds andTitle:[MyAppDataManager theRevisedName:[_profile valueForKey:@"pname"] andUID:_userid]];
//                        aNote.delegate = self;
//                        [self.navigationController.view addSubview:aNote];
//                        [aNote release];
//                        
//                    }
//                    
//                });
            }
            else if([fensi rangeOfString:_userid].location != NSNotFound)
            {
                _linked = NO;
                _kind = 1;
            }
            else if([black rangeOfString:_userid].location != NSNotFound)
            {
                _linked = NO;
                _kind = 3;
            }
            else
            {
                _linked = NO;
                _kind = 4;
            }
//刷新个人资料界面
//            [self.tableView reloadSections:[NSIndexSet indexSetWithIndex:isHaveGRJS?4:3] withRowAnimation:UITableViewRowAnimationNone];
//删除拉黑的对话
            [MyAppDataManager deleteBlackDialog:[[resDic valueForKey:@"friendlist"] valueForKey:@"x"]];
            
        }
        else
        {
            UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"noticeNotice", nil) message:[MyAppDataManager IsInternationalLanguage:[resDic valueForKey:@"error"]] delegate:nil cancelButtonTitle:NSLocalizedString(@"确定", nil) otherButtonTitles:nil, nil];
            [alert show];
            [alert release];
        }
    }
    else if([AppComManager respondsDic:resDic isFunctionData:BanBu_Report_User])
    {
        
        if([[resDic valueForKey:@"ok"]boolValue])
        {
            NSMutableDictionary *uidDic = [NSMutableDictionary dictionaryWithDictionary:[UserDefaults valueForKey:MyAppDataManager.useruid]];
            [uidDic setValue:[resDic valueForKey:@"friendlist"] forKey:FriendShip];
            [UserDefaults setValue:uidDic forKey:MyAppDataManager.useruid];
            [UserDefaults synchronize];
            
            if(!_isBlack || _linked ==YES)
            {
                if(!_linked)
                {
                    [self setLinkButtonAppearence:!_linked];
                }
                else
                {
                    [self setLinkButtonAppearence:!_linked];
                }
                _linked = !_linked;
                if(!_linked && _isBlack)
                {
                    //拉黑并举报成功
                    if(_pullBlackAndReportReturn)
                    {
                        _pullBlackAndReportReturn(reportBtn,YES);
                    }
                    [TKLoadingView showTkloadingAddedTo:_personData.navigationController.view title:NSLocalizedString(@"blackAndReportOK", nil) activityAnimated:NO duration:1.0];
                }
            }
            else
            {
//拉黑并举报成功
                if(_pullBlackAndReportReturn)
                {
                    _pullBlackAndReportReturn(reportBtn,YES);
                }
                [TKLoadingView showTkloadingAddedTo:_personData.navigationController.view title:NSLocalizedString(@"blackAndReportOK", nil) activityAnimated:NO duration:1.0];
            }
            //显示黑名单
            _kind = 3; _linked = NO;
//刷新界面
//            [self.tableView reloadSections:[NSIndexSet indexSetWithIndex:isHaveGRJS?4:3] withRowAnimation:UITableViewRowAnimationNone];
//删除黑名单对话
            [MyAppDataManager deleteBlackDialog:[[resDic valueForKey:@"friendlist"] valueForKey:@"x"]];
        }
        else
        {
            [TKLoadingView showTkloadingAddedTo:_personData.navigationController.view title:[resDic valueForKey:@"error"] activityAnimated:NO duration:1.0];
        }
    }
    else if([AppComManager respondsDic:resDic isFunctionData:BanBu_Set_FriendName])
    {
//        if([[resDic valueForKey:@"ok"]boolValue])
//        {
//            NSMutableDictionary *uidDic = [NSMutableDictionary dictionaryWithDictionary:[UserDefaults valueForKey:MyAppDataManager.useruid]];
//            [uidDic setValue:[resDic valueForKey:@"list"] forKey:@"renameflist"];
//            [UserDefaults setValue:uidDic forKey:MyAppDataManager.useruid];
//            [UserDefaults synchronize];
//            [aNote removeFromSuperview];
//            self.title =  [MyAppDataManager IsInternationalLanguage:[MyAppDataManager theRevisedName:[_profile valueForKey:@"pname"] andUID:_userid]];
//        }
//        else
//        {
//            [TKLoadingView showTkloadingAddedTo:self.navigationController.view title:[MyAppDataManager IsInternationalLanguage:[resDic valueForKey:@"error"]] activityAnimated:NO duration:1.0];
//        }
    }
//    else if([AppComManager respondsDic:resDic isFunctionData:BanBu_Get_User_Info])
//    {
//        if([[resDic valueForKey:@"ok"]boolValue])
//        {
//            NSMutableDictionary *userInfor = [NSMutableDictionary dictionaryWithDictionary:resDic];
//            [userInfor removeObjectForKey:@"fc"];
//            [userInfor removeObjectForKey:@"actioncount"];
//            NSDictionary *dic = [NSDictionary dictionaryWithObjectsAndKeys:userInfor,keyPersonalInfo,[resDic valueForKey:@"userid"],@"userid",nil];
//            
//            __block NSMutableArray *saveArr = [[NSMutableArray alloc] initWithObjects:dic, nil];
//            
//            dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
//            dispatch_async(queue, ^{
//                [MyAppDataManager writePersonalDataToDB:saveArr];
//                [saveArr release];
//            });
//
//            NSMutableDictionary  *parDic = [[NSMutableDictionary alloc] initWithDictionary:resDic];
//            if([[parDic valueForKey:@"ltime"] rangeOfString:@"-"].location != NSNotFound)
//            {
//                [parDic setValue:[MyAppDataManager getTheLastOnlineTime:[parDic valueForKey:@"ltime"]] forKey:@"ltime"];
//            }
//            
//            _profile = [[NSMutableDictionary alloc]initWithDictionary:parDic];
//            _photoView.uface = [_profile valueForKey:@"uface"];
//            _photoView.myPhotos = [_profile valueForKey:@"facelist"];
//            if([[_profile allKeys] indexOfObject:@"userlevel"] != NSNotFound)
//                _photoView.isVIP = [[_profile valueForKey:@"userlevel"] integerValue]>0;
//            else
//                _photoView.isVIP = NO;
//            
//            NSArray *grjsArr = [NSArray arrayWithObjects: @"liked" ,@"lovego" , @"company" , @"jobtitle" , @"school" , nil];
//            NSArray *titleArr1 = [NSArray arrayWithObjects: NSLocalizedString(@"s2c0", nil),NSLocalizedString(@"s2c1", nil),NSLocalizedString(@"s2c2", nil),NSLocalizedString(@"s2c3", nil),NSLocalizedString(@"s2c4", nil), nil];
//            grjsNum=0;
//            for (int i=0; i<5; i++)
//            {
//                if([[_profile valueForKey:[grjsArr objectAtIndex:i]] length])
//                {
//                    NSDictionary *aDic = [NSDictionary dictionaryWithObject:[_profile valueForKey:[grjsArr objectAtIndex:i]] forKey:[titleArr1 objectAtIndex:i]];
//                    [titleAndValueArr addObject:aDic];
//                    grjsNum++;
//                }
//            }
//            grjsNum?(isHaveGRJS = YES):(isHaveGRJS = NO);
//            self.title =  [MyAppDataManager IsInternationalLanguage:[MyAppDataManager theRevisedName:[_profile valueForKey:@"pname"] andUID:_userid]];
//            
//            self.tableView.tableHeaderView = [BanBu_PersonDataViewController creatHeaderView:_profile];
//            
//            [self.tableView reloadData];
//            
//        }
//    }
//    else if ([AppComManager respondsDic:resDic isFunctionData:BanBu_Get_Actioncount_Byfuid_V2])
//    {
//        if([[resDic valueForKey:@"ok"] boolValue])
//        {
//            [self setBadgeValue:[resDic valueForKey:@"actioncount"]];
//        }
//    }
}
- (void)dealloc {
    self.addlinkReturn = nil;
    self.startChatReturn = nil;
    self.pullBlackAndReportReturn = nil;
    self.pullBlackReturn = nil;
    [chatBtn release];
    [linkBtn release];
    [pullblack release];
    [reportBtn release];
    [voiceSet release];
    [super dealloc];
}
@end
